package pages;

import org.openqa.selenium.By;
import utils.Log4Test;
import utils.WebDriverWrapper;

/**
 * Created by Vadim on 6/10/14.
 */
public class HouseAndGardenPage extends BasePage {
    private static final String URL_HOUSE = "http://rozetka.com.ua/house_garden/c152456/";
    private static final By pageCars = By.xpath("//*[@id='house_garden']/div/a");

    public HouseAndGardenPage(WebDriverWrapper driver) {
        super(driver, URL_HOUSE);
    }

    public void open() {
        driver.findElement(pageCars).click();
        if (driver.getCurrentUrl().equals(URL_HOUSE)) {
            Log4Test.info("Page house and gerden is opened");
        } else {
            Log4Test.error("Page house and gerden isn't opened");
        }
    }
}
